<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<style>
    .text-l {
        text-align: left !important;
    }

    .flex {
        display: flex;
        flex-direction: column;
    }

    .flex2 {
        display: flex;
    }
    .mr1{
        margin-right: 10px;
    }
</style>
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="id" name="id" th:value="${memberApply.id}" type="hidden">
                        <input id="applicationForm" name="applicationForm" th:value="${memberApply.applicationForm}" type="hidden">
                        <input id="constructionCertificate" name="constructionCertificate" th:value="${memberApply.constructionCertificate}" type="hidden">
                        <input id="unitType" name="unitType" th:value="${memberApply.unitType}"
                               class="form-control" type="hidden">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">申请单位成员类型</label>
                            <label class="col-sm-8 control-label text-l"
                                   th:text="${#strings.listSplit('职业学校,科研机构,行业机构组织,上下游企业,其他单位',',')[memberApply.unitType]}">申请单位成员类型</label>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">单位名称：</label>
                            <div class="col-sm-8">
                                <textarea id="name" style="height: 50px" th:text="${memberApply.name}" name="name"
                                          class="form-control"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">单位类型(企业规模）：</label>
                            <div class="col-sm-8">
                                <select th:if="${memberApply.unitType==0}" class="form-control" id="type" name="type"
                                        th:value="${memberApply.type}">
                                    <option value="中职学校">中职学校</option>
                                    <option value="高职学校">高职学校</option>
                                    <option value="职业本科">职业本科</option>
                                    <option value="普通高校">普通高校</option>
                                </select>
                                <select th:if="${memberApply.unitType==1}" class="form-control" id="type" name="type"
                                        th:value="${memberApply.type}">
                                    <option value="国家级">国家级</option>
                                    <option value="省级">省级</option>
                                    <option value="地市级">地市级</option>
                                    <option value="县级">县级</option>
                                </select>
                                <select th:if="${memberApply.unitType==2}" class="form-control" id="type" name="type"
                                        th:value="${memberApply.type}">
                                    <option value="协会">协会</option>
                                    <option value="学会">学会</option>
                                    <option value="行指委">行指委</option>
                                    <option value="联盟">联盟</option>
                                    <option value="委员会">委员会</option>
                                </select>
                                <select th:if="${memberApply.unitType==3}" class="form-control" id="type" name="type"
                                        th:value="${memberApply.type}">
                                    <option value="大型企业">大型企业</option>
                                    <option value="中型企业">中型企业</option>
                                    <option value="小型企业">小型企业</option>
                                    <option value="微型企业">微型企业</option>
                                </select>
                                <select th:if="${memberApply.unitType==4}" class="form-control" id="type" name="type"
                                        th:value="${memberApply.type}">
                                    <option value="事业单位">事业单位</option>
                                    <option value="政府机关">政府机关</option>
                                    <option value="其他单位">其他单位</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group" th:if="${memberApply.unitType!=3}">
                            <label class="col-sm-3 control-label">单位性质：</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="ship" name="ship" th:value="${memberApply.ship}">
                                    <option value="公办">公办</option>
                                    <option value="民办">民办</option>
                                    <option value="民营">民营</option>
                                    <option value="公建民营">公建民营</option>
                                    <option value="民办公助">民办公助</option>
                                    <option value="社会团体">社会团体</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group" th:if="${memberApply.unitType!=3}">
                            <label class="col-sm-3 control-label">申请意向：</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="intention" name="intention"
                                        th:value="${memberApply.intention}">
                                    <option value="0">常务副理事单位</option>
                                    <option value="1">副理事单位</option>
                                    <option value="2">常务理事单位</option>
                                    <option value="3">理事单位</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">学校/机构代码：</label>
                            <div class="col-sm-8">
                                <textarea id="schoolOrgCode" style="height: 50px" th:text="${memberApply.schoolOrgCode}" name="name"
                                          class="form-control"></textarea>
                            </div>
                        </div>
                        <div class="div_3">
                            <label class="col-sm-3 control-label">单位地址：</label>
                            <div class="flex col-sm-8" id="adre">
                                <label th:text="${memberApply.address}" id="address"></label>
                                <div class="flex2">
                                    <div class="flex2">
                                        <label class="control-label mr1">所属省份：</label>
                                        <div class="mr1">
                                            <select id="province" name="province" placeholder="province"
                                                    class="form-control"
                                                    type="text"></select>
                                        </div>
                                    </div>
                                    <div class="flex2">
                                        <label class="control-label mr1" id="city2">所属市：</label>
                                        <div class="mr1">
                                            <select id="city" name="city" placeholder="city" class="form-control"
                                                    type="text"></select>
                                        </div>
                                    </div>
                                    <div class="flex2">
                                        <label class="control-label mr1">所属区</label>
                                        <div class="mr1">
                                            <select id="district" name="district" placeholder="county"
                                                    class="form-control" type="text"></select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">详细地址：</label>
                            <div class="col-sm-8">
                                <textarea id="detailAddress" style="height: 50px" th:text="${memberApply.detailAddress}" name="name"
                                          class="form-control"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">法人代表：</label>
                            <div class="col-sm-8">
                                <input id="legalRepresentative" name="legalRepresentative"
                                       th:value="${memberApply.legalRepresentative}" class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">办公电话：</label>
                            <div class="col-sm-8">
                                <input id="officePhone" name="officePhone" th:value="${memberApply.officePhone}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">法人手机号：</label>
                            <div class="col-sm-8">
                                <input id="legalPhone" name="legalPhone" th:value="${memberApply.legalPhone}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">法人邮箱号：</label>
                            <div class="col-sm-8">
                                <input id="legalMail" name="legalMail" th:value="${memberApply.legalMail}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">推荐代表：</label>
                            <div class="col-sm-8">
                                <input id="recommend" name="recommend" th:value="${memberApply.recommend}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">职务：</label>
                            <div class="col-sm-8">
                                <input id="post" name="post" th:value="${memberApply.post}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">职称：</label>
                            <div class="col-sm-8">
                                <input id="position" name="position" th:value="${memberApply.position}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">所在部门：</label>
                            <div class="col-sm-8">
                                <input id="department" name="department" th:value="${memberApply.department}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">推荐人手机号：</label>
                            <div class="col-sm-8">
                                <input id="recommPhone" name="recommPhone" th:value="${memberApply.recommPhone}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">推荐人邮箱号：</label>
                            <div class="col-sm-8">
                                <input id="recommMail" name="recommMail" th:value="${memberApply.recommMail}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">通信地址：</label>
                            <div class="col-sm-8">
                                <textarea id="commAddress" style="height: 50px" th:text="${memberApply.commAddress}" name="name"
                                          class="form-control"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">备注：</label>
                            <div class="col-sm-8">
                                <textarea id="remark" style="height: 60px" th:text="${memberApply.remark}" name="remark"
                                          class="form-control"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">申请表：</label>
                            <div class="col-sm-8">
                                <div class="listImg test1"></div>
                                <button type="button" class="layui-btn" id="test1">上传附件</button>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">参与单位建设证明：</label>
                            <div class="col-sm-8">
                                <div class="listImg test2"></div>
                                <button type="button" class="layui-btn" id="test2">上传附件</button>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">聘书姓名：</label>
                            <div class="col-sm-8">
                                <input id="contractName" name="contractName" th:value="${memberApply.contractName}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">邮寄地址：</label>
                            <div class="col-sm-8">
                                <input id="mailingAddress" name="mailingAddress"
                                       th:value="${memberApply.mailingAddress}" class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">收件人姓名：</label>
                            <div class="col-sm-8">
                                <input id="addresseeName" name="addresseeName" th:value="${memberApply.addresseeName}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">收件人联系电话：</label>
                            <div class="col-sm-8">
                                <input id="addresseePhone" name="addresseePhone"
                                       th:value="${memberApply.addresseePhone}" class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group" th:if="${memberApply.unitType==2}">
                            <label class="col-sm-3 control-label">发证单位：</label>
                            <div class="col-sm-8">
                                <input id="issueUnit" name="issueUnit" th:value="${memberApply.issueUnit}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group" th:if="${memberApply.unitType==3}">
                            <label class="col-sm-3 control-label">在岗职业人数：</label>
                            <div class="col-sm-8">
                                <input id="peopleNum" name="peopleNum" th:value="${memberApply.peopleNum}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group" th:if="${memberApply.unitType==3}">
                            <label class="col-sm-3 control-label">所属行业：</label>
                            <div class="col-sm-8">
                                <input id="trade" name="trade" th:value="${memberApply.trade}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group" th:if="${memberApply.unitType==3}">
                            <label class="col-sm-3 control-label">是否为产教融合型企业：</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="isEnterprise" name="isEnterprise"
                                        th:value="${memberApply.isEnterprise}">
                                    <option value="0">国家级</option>
                                    <option value="1">省级</option>
                                    <option value="2">否</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group" th:if="${memberApply.unitType==3}">
                            <label class="col-sm-3 control-label">企业类型：</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="enterpriseType" name="enterpriseType"
                                        th:value="${memberApply.enterpriseType}">
                                    <option value="内资企业（国有企业）">内资企业（国有企业）</option>
                                    <option value="内资企业（集体企业）">内资企业（集体企业）</option>
                                    <option value="内资企业（股份合作企业）">内资企业（股份合作企业）</option>
                                    <option value="内资企业（联营企业）">内资企业（联营企业）</option>
                                    <option value="内资企业（有限责任公司）">内资企业（有限责任公司）</option>
                                    <option value="内资企业（股份有限公司）">内资企业（股份有限公司）</option>
                                    <option value="内资企业（私人企业）">内资企业（私人企业）</option>
                                    <option value="内资企业（其他企业）">内资企业（其他企业）</option>
                                    <option value="港澳台商投资企业（港、澳、台资合资、合作、独资经营企业）">
                                        港澳台商投资企业（港、澳、台资合资、合作、独资经营企业）
                                    </option>
                                    <option value="港澳台商投资企业（股份有限公司）">港澳台商投资企业（股份有限公司）
                                    </option>
                                    <option value="外商投资企业（中外合资、合作经营企业）">
                                        外商投资企业（中外合资、合作经营企业）
                                    </option>
                                    <option value="外商投资企业（外资企业）">外商投资企业（外资企业）</option>
                                    <option value="外商投资企业（外商投资股份有限公司）">
                                        外商投资企业（外商投资股份有限公司）
                                    </option>
                                    <option value="事业单位拨款（事业单位）">事业单位拨款（事业单位）</option>
                                    <option value="政府财政预算（机关行政单位）">政府财政预算（机关行政单位）</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group" th:if="${memberApply.unitType==3}">
                            <label class="col-sm-3 control-label">统一社会信用代码：</label>
                            <div class="col-sm-8">
                                <input id="socialCreditCode" name="socialCreditCode"
                                       th:value="${memberApply.socialCreditCode}" class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group" th:if="${memberApply.unitType==3}">
                            <label class="col-sm-3 control-label">核心产品（服务）名称：</label>
                            <div class="col-sm-8">
                                <input id="coreProductName" name="coreProductName"
                                       th:value="${memberApply.coreProductName}" class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script src="/js/jquery.citys.js"></script>
<script type="text/javascript" src="/js/webJs/jzweb/memberApply/edit.js">
</script>
<script>//文件名字
let fileName = ''
var prefix = "/jzweb/memberApply";
//文件上传地址
let myFiles = {
    test1: 'applicationForm',//申请表
    test2: 'constructionCertificate',//参与单位建设证明
}
let myDatas = {
}
$(function () {
    //获取用户信息
    //省市区联动
    if ($('#address').text().split('/')[0] == '北京市') {
        $('#city2').text('所属市：'+'北京市')
    }
    if ($('#address').text().split('/')[0] == '天津市') {
        $('#city2').text('所属市：'+'天津市')
    }
    if ($('#address').text().split('/')[0] == '重庆市') {
        $('#city2').text('所属市：'+'重庆市')
    }
    if ($('#address').text().split('/')[0] == '上海市') {
        $('#city2').text('所属市：'+'上海市')
    }
    $('#adre').citys({
        province: $("#province").val()||$('#address').text().split('/')[0],
        city: $("#city").val()||$('#address').text().split('/')[1],
        district: $("#district").val()||$('#address').text().split('/')[2],
        onChange: function (info) {
            let city = ''
            if (info.province == '北京市') {
                city = '北京市'
                $('#city2').text('所属市：'+'北京市')
            }
            if (info.province == '天津市') {
                city = '天津市'
                $('#city2').text('所属市：'+'天津市')
            }
            if (info.province == '重庆市') {
                city = '重庆市'
                $('#city2').text('所属市：'+'重庆市')
            }
            if (info.province == '上海市') {
                city = '上海市'
                $('#city2').text('所属市：'+'上海市')
            }
            if (info.province != '北京市' && info.province != '天津市' && info.province != '上海市' && info.province != '重庆市') {
                city = info.city
                $('#city2').text('所属市：')
            }
            $('#address').text(info.province + '/' + city + '/' + info.district)
        }
    });
});
function removeContent(parent, element, item) {
    $(parent).show();
    $(element).html('');
    myDatas[myFiles[item]] = ''

}
$().ready(function () {

    let applicationForm = $('#applicationForm').val()
    let constructionCertificate = $('#constructionCertificate').val()
    if(applicationForm){
        let str = '';
        str += (`<div class="closeBtn "><a class="upImg" href="${applicationForm}" target="_blank">${applicationForm}</a>`)+ `<span class="iconclose close2" ><img src="../../../img/close.png"></span></div>   `;
        $(`.test1`).html(str);
        $(`#test1`).hide();
        $(`.test1 .close2`).click(() => {
            removeContent(`#test1`, `.test1`)
        })
    }
    if(constructionCertificate){
        let str = '';
        str += (`<div class="closeBtn "><a class="upImg" href="${constructionCertificate}" target="_blank">${constructionCertificate}</a>`)+ `<span class="iconclose close2" ><img src="../../../img/close.png"></span></div>   `;
        $(`.test2`).html(str);
        $(`#test2`).hide();
        $(`.test2 .close2`).click(() => {
            removeContent(`#test2`, `.test2`)
        })
    }
    layui.use(['upload', 'layer'], function () {
        var $ = layui.jquery
            , upload = layui.upload
            , layer = layui.layer;

        //图片上传
        Object.keys(myFiles).forEach(item => {

            upload.render({
                elem: `#${item}`,
                url: '/common/sysFile/upload', // 实际使用时改成您自己的上传接口即可。
                multiple: true,
                accept:  'file'
                , before: (obj) => {
                    //获取名字
                    obj.preview((index, file, result) => {
                        fileName = file.name
                    })
                    layer.load();
                }
                , done: (res) => {
                    if (res.code == 0) {
                        layer.closeAll();
                        let str = '';
                        myDatas[myFiles[item]] = res.data
                        str += (`<div class="closeBtn "><a class="upImg" href="${res.data}" target="_blank">${fileName}</a>`)+ `<span class="iconclose close2" ><img src="../../../img/close.png"></span></div>   `;
                        $(`.${item}`).html(str);
                        $(`#${item}`).hide();
                        $(`.${item} .close2`).click(() => {
                            removeContent(`#${item}`, `.${item}`)
                        })
                    }
                }
                , error: function (res) {
                    var index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe 层的索引
                    parent.layer.close(index); // 再执行关闭
                    layer.msg(res.msg)
                }
            });


        })


    })
});
$.validator.setDefaults({
    submitHandler: function () {
        //判断所有数据
        let addresseePhone = $('#addresseePhone').val()
        let name = $('#name').val()
        let unitType = $('#unitType').val()
        if (null == name || '' == name.trim()) {
            layer.msg('请输入单位名称');
            return;
        }
        let address = $('#address').text()
        if (null == address || '' == address.trim()) {
            layer.msg('请选择省市区');
            return;
        }
        if (!address.split('/')[0]) {
            layer.msg('请选择所属省');
            return;
        }
        if (!address.split('/')[0]) {
            layer.msg('请选择所属市');
            return;
        }
        if (!address.split('/')[0]) {
            layer.msg('请选择所属区');
            return;
        }
        let schoolOrgCode = $('#schoolOrgCode').val()
        if (unitType == 0 && (null == schoolOrgCode || '' == schoolOrgCode.trim())) {
            layer.msg('请输入学校/机构代码');
            return;
        }
        let detailAddress = $('#detailAddress').val()
        if (null == detailAddress || '' == detailAddress.trim()) {
            layer.msg('请输入详细地址');
            return;
        }
        let legalRepresentative = $('#legalRepresentative').val()
        if (null == legalRepresentative || '' == legalRepresentative.trim()) {
            layer.msg('请输入法人代表');
            return;
        }
        let officePhone = $('#officePhone').val()
        let legalPhone = $('#legalPhone').val()
        let recommPhone = $('#recommPhone').val()
        if (null == officePhone || '' == officePhone.trim()) {
            layer.msg('请输入办公电话');
            return;
        }

        if (null == legalPhone || '' == legalPhone.trim()) {
            layer.msg('请输入法人手机号');
            return;
        }
        let recommend = $('#recommend').val()
        if (null == recommend || '' == recommend.trim()) {
            layer.msg('请输入推荐代表');
            return;
        }
        let post = $('#post').val()
        if (null == post || '' == post.trim()) {
            layer.msg('请输入职务');
            return;
        }
        let position = $('#position').val()
        if (null == position || '' == position.trim()) {
            layer.msg('请输入职称');
            return;
        }
        let department = $('#department').val()
        if (null == department || '' == department.trim()) {
            layer.msg('请输入所在部门');
            return;
        }
        if (null == recommPhone || '' == recommPhone.trim()) {
            layer.msg('请输入推荐人手机号');
            return;
        }
        let commAddress = $('#commAddress').val()
        if (null == commAddress || '' == commAddress.trim()) {
            layer.msg('请输入通信地址');
            return;
        }
        let remark = $('#remark').val()
        if (null == remark || '' == remark.trim()) {
            layer.msg('请输入备注');
            return;
        }
        let applicationForm = $('#applicationForm').val()||myDatas['applicationForm']
        if (null == applicationForm || '' == applicationForm.trim()) {
            layer.msg('请上传申请表');
            return;
        }
        let constructionCertificate = $('#constructionCertificate').val()||myDatas['constructionCertificate']
        if (null == constructionCertificate || '' == constructionCertificate.trim()) {
            layer.msg('请上传参与单位建设证明');
            return;
        }
        let contractName = $('#contractName').val()
        if (null == constructionCertificate || '' == contractName.trim()) {
            layer.msg('请输入聘书姓名');
            return;
        }
        let mailingAddress = $('#mailingAddress').val()
        if (null == mailingAddress || '' == mailingAddress.trim()) {
            layer.msg('请输入邮寄地址');
            return;
        }
        let addresseeName = $('#addresseeName').val()
        if (null == addresseeName || '' == addresseeName.trim()) {
            layer.msg('请输入收件人');
            return;
        }
        if (null == addresseePhone || '' == addresseePhone.trim()) {
            layer.msg('请输入收件人联系电话');
            return;
        }
        let issueUnit = $('#issueUnit').val()
        if (unitType == 2 && (null == issueUnit || '' == issueUnit.trim())) {
            layer.msg('请输入发证单位');
            return;
        }
        if (unitType == 3) {
            let peopleNum = $('#peopleNum').val()
            if (null == peopleNum || '' == peopleNum.trim()) {
                layer.msg('请输入在岗职业人数');
                return;
            }
            console.log(1)
            let trade = $('#trade').val()
            if (null == trade || '' == trade.trim()) {
                layer.msg('请输入所属行业');
                return;
            }
            console.log(1)
            let socialCreditCode = $('#socialCreditCode').val()
            if (null == socialCreditCode || '' == socialCreditCode.trim()) {
                layer.msg('请输入统一社会信用代码');
                return;
            }
            console.log(1)
            let coreProductName = $('#coreProductName').val()
            if (null == coreProductName || '' == coreProductName.trim()) {
                layer.msg('请输入核心产品（服务）名称');
                return;
            }
        }
        var loadIndex = layer.msg('请稍后...', {
            icon: 16,
            shade: 0.01,
            time: 1000*30
        });
        const data = {
            'unitType' : $('#unitType').val(),
            'id' : $('#id').val(),
            'name' : $('#name').text(),
            'type' : $('#type').val(),
            'ship' : $('#ship').val(),
            'intention' : $('#intention').val(),
            'schoolOrgCode' : $('#schoolOrgCode').val(),
            'address' : $('#address').text(),
            'detailAddress' : $('#detailAddress').val(),
            'LegalRepresentative' : $('#LegalRepresentative').val(),
            'officePhone' : $('#officePhone').val(),
            'LegalPhone' : $('#LegalPhone').val(),
            'recommend' : $('#recommend').val(),
            'post' : $('#post').val(),
            'department' : $('#department').val(),
            'recommPhone' : $('#recommPhone').val(),
            'LegalMail' : $('#LegalMail').val(),
            'position' : $('#position').val(),
            'recommMail' : $('#recommMail').val(),
            'commAddress' : $('#commAddress').val(),
            'remark' : $('#remark').val(),
            'applicationForm' : $('#applicationForm').val()||myDatas['applicationForm'],
            'constructionCertificate' : $('#constructionCertificate').val()||myDatas['constructionCertificate'],
            'contractName' : $('#contractName').val(),
            'mailingAddress' : $('#mailingAddress').val(),
            'addresseeName' : $('#addresseeName').val(),
            'addressee_phone' : $('#addresseePhone').val(),
            'addresseePhone' : $('#IssueUnit').val(),
            'peopleNum' : $('#peopleNum').val(),
            'trade' : $('#trade').val(),
            'isEnterprise' : $('#isEnterprise').val(),
            'enterpriseType' : $('#enterpriseType').val(),
            'socialCreditCode' : $('#socialCreditCode').val(),
            'coreProductName' : $('#coreProductName').val(),
        }
        $.ajax({
            url : prefix+"/updateMemberApply",
            cache : true,
            type : "POST",
            headers: {
                'Content-Type': 'application/json'
            },
            data :  JSON.stringify(data),// 你的formid
            async : false,
            success : function(r) {
                layer.close(loadIndex)
                if (r.code==0) {
                    layer.msg(r.msg);
                    setTimeout(()=>{
                        var index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe 层的索引
                        parent.layer.close(index); // 再执行关闭
                    },1000)
                }else{
                    layer.msg(r.msg);
                    setTimeout(()=>{
                        var index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe 层的索引
                        parent.layer.close(index); // 再执行关闭
                    },1000)
                }
            }
        });
    }
});
</script>
</body>
</html>
